package com.shali.wechat.order.client;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.shali.wechat.order.dto.CartDTO;
import com.shali.wechat.order.entity.ProductInfo;

@FeignClient("MICROSERVICE-WECHAT-ORDER-PRODUCT")
public interface ProductFeignClient {

	@RequestMapping(value = "/msg",method = RequestMethod.GET)
	String msg();
	
	@PostMapping("/product/listForOrder")
	List<ProductInfo> getProductInfoList(@RequestBody List<String> ids);
	
	@PostMapping("/product/decreaseStock")
	void decreaseStock(@RequestBody List<CartDTO> cartDTOList);
}
